<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.4"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Flow: flow::perf::Checkpointing_timer::Aggregator Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">Flow<span id="projectnumber">&#160;2.0.0</span>
   </div>
   <div id="projectbrief">Flow project: Public API.</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.4 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespaceflow.html">flow</a></li><li class="navelem"><a class="el" href="namespaceflow_1_1perf.html">perf</a></li><li class="navelem"><a class="el" href="classflow_1_1perf_1_1Checkpointing__timer.html">Checkpointing_timer</a></li><li class="navelem"><a class="el" href="classflow_1_1perf_1_1Checkpointing__timer_1_1Aggregator.html">Aggregator</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="classflow_1_1perf_1_1Checkpointing__timer_1_1Aggregator-members.html">List of all members</a>  </div>
  <div class="headertitle"><div class="title">flow::perf::Checkpointing_timer::Aggregator Class Reference</div></div>
</div><!--header-->
<div class="contents">

<p>This companion/inner class of <a class="el" href="classflow_1_1perf_1_1Checkpointing__timer.html" title="The central class in the perf Flow module, this efficiently times the user&#39;s operation,...">Checkpointing_timer</a> provides aggregation of results from many <code><a class="el" href="classflow_1_1perf_1_1Checkpointing__timer.html" title="The central class in the perf Flow module, this efficiently times the user&#39;s operation,...">Checkpointing_timer</a></code>s each measuring some user operation being repeated many times; particularly when the operation consists of multiple steps (checkpoints) of interest.  
 <a href="classflow_1_1perf_1_1Checkpointing__timer_1_1Aggregator.html#details">More...</a></p>

<p><code>#include &lt;checkpt_timer.hpp&gt;</code></p>
<div class="dynheader">
Inheritance diagram for flow::perf::Checkpointing_timer::Aggregator:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="classflow_1_1perf_1_1Checkpointing__timer_1_1Aggregator__inherit__graph.svg" width="170" height="119"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<div class="dynheader">
Collaboration diagram for flow::perf::Checkpointing_timer::Aggregator:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="classflow_1_1perf_1_1Checkpointing__timer_1_1Aggregator__coll__graph.svg" width="170" height="119"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:adbe0250e405ae2be4b434f5e2cb76f7a"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1perf_1_1Checkpointing__timer_1_1Aggregator.html#adbe0250e405ae2be4b434f5e2cb76f7a">Aggregator</a> (<a class="el" href="classflow_1_1log_1_1Logger.html">log::Logger</a> *logger_ptr, std::string &amp;&amp;name_moved, size_t max_n_samples)</td></tr>
<tr class="memdesc:adbe0250e405ae2be4b434f5e2cb76f7a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructs a new, empty aggregator.  <a href="classflow_1_1perf_1_1Checkpointing__timer_1_1Aggregator.html#adbe0250e405ae2be4b434f5e2cb76f7a">More...</a><br /></td></tr>
<tr class="separator:adbe0250e405ae2be4b434f5e2cb76f7a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a18bdb2f17039bcb82ddd4022a3a8340d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1perf_1_1Checkpointing__timer_1_1Aggregator.html#a18bdb2f17039bcb82ddd4022a3a8340d">aggregate</a> (<a class="el" href="namespaceflow_1_1perf.html#a09ba385403a0f347f283659a6e9d971b">Checkpointing_timer_ptr</a> timer_ptr)</td></tr>
<tr class="memdesc:a18bdb2f17039bcb82ddd4022a3a8340d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Register given <a class="el" href="classflow_1_1perf_1_1Checkpointing__timer.html" title="The central class in the perf Flow module, this efficiently times the user&#39;s operation,...">Checkpointing_timer</a> for aggregated results.  <a href="classflow_1_1perf_1_1Checkpointing__timer_1_1Aggregator.html#a18bdb2f17039bcb82ddd4022a3a8340d">More...</a><br /></td></tr>
<tr class="separator:a18bdb2f17039bcb82ddd4022a3a8340d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aeb9e86afbbf49865c6cce1ae7d2fc7a3"><td class="memItemLeft" align="right" valign="top"><a id="aeb9e86afbbf49865c6cce1ae7d2fc7a3" name="aeb9e86afbbf49865c6cce1ae7d2fc7a3"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>clear</b> ()</td></tr>
<tr class="memdesc:aeb9e86afbbf49865c6cce1ae7d2fc7a3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Act as if <a class="el" href="classflow_1_1perf_1_1Checkpointing__timer_1_1Aggregator.html#a18bdb2f17039bcb82ddd4022a3a8340d" title="Register given Checkpointing_timer for aggregated results.">aggregate()</a> has never been called since construction. <br /></td></tr>
<tr class="separator:aeb9e86afbbf49865c6cce1ae7d2fc7a3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a29c66da23a48bdb5096bf2f206f5cae4"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1perf_1_1Checkpointing__timer_1_1Aggregator.html#a29c66da23a48bdb5096bf2f206f5cae4">log_aggregated_results</a> (<a class="el" href="classflow_1_1log_1_1Logger.html">log::Logger</a> *alternate_logger_ptr_or_null, bool show_sum, bool show_mean, uint64_t mean_scale_or_zero) const</td></tr>
<tr class="memdesc:a29c66da23a48bdb5096bf2f206f5cae4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Called after the final <a class="el" href="classflow_1_1perf_1_1Checkpointing__timer.html" title="The central class in the perf Flow module, this efficiently times the user&#39;s operation,...">Checkpointing_timer</a> has finished (final <code><a class="el" href="classflow_1_1perf_1_1Checkpointing__timer.html#a9e6078df059d5626ab5774f0a33fbad7" title="Records a checkpoint, which takes a sample of all enabled Clock_types&#39; clocks and records the corresp...">checkpoint()</a></code> call) and been <code><a class="el" href="classflow_1_1perf_1_1Checkpointing__timer_1_1Aggregator.html#a18bdb2f17039bcb82ddd4022a3a8340d" title="Register given Checkpointing_timer for aggregated results.">aggregate()</a></code>d, this <code>INFO</code>-logs human-friendly readout of the aggregated results so far.  <a href="classflow_1_1perf_1_1Checkpointing__timer_1_1Aggregator.html#a29c66da23a48bdb5096bf2f206f5cae4">More...</a><br /></td></tr>
<tr class="separator:a29c66da23a48bdb5096bf2f206f5cae4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acbacf3b4842b77f542082e7a186f1434"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespaceflow_1_1perf.html#a09ba385403a0f347f283659a6e9d971b">Checkpointing_timer_ptr</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1perf_1_1Checkpointing__timer_1_1Aggregator.html#acbacf3b4842b77f542082e7a186f1434">create_aggregated_result</a> (<a class="el" href="classflow_1_1log_1_1Logger.html">log::Logger</a> *alternate_logger_ptr_or_null, bool info_log_result, uint64_t mean_scale_or_zero=1) const</td></tr>
<tr class="memdesc:acbacf3b4842b77f542082e7a186f1434"><td class="mdescLeft">&#160;</td><td class="mdescRight">Provides programmatic access to the aggregation result that would be logged by <a class="el" href="classflow_1_1perf_1_1Checkpointing__timer_1_1Aggregator.html#a29c66da23a48bdb5096bf2f206f5cae4" title="Called after the final Checkpointing_timer has finished (final checkpoint() call) and been aggregate(...">log_aggregated_results()</a> &ndash; in the form of a returned new <a class="el" href="classflow_1_1perf_1_1Checkpointing__timer.html" title="The central class in the perf Flow module, this efficiently times the user&#39;s operation,...">Checkpointing_timer</a> that stores those numbers.  <a href="classflow_1_1perf_1_1Checkpointing__timer_1_1Aggregator.html#acbacf3b4842b77f542082e7a186f1434">More...</a><br /></td></tr>
<tr class="separator:acbacf3b4842b77f542082e7a186f1434"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classflow_1_1log_1_1Log__context"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classflow_1_1log_1_1Log__context')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classflow_1_1log_1_1Log__context.html">flow::log::Log_context</a></td></tr>
<tr class="memitem:ae7100d2dd130d8f130e3e64fdb1f4fd9 inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1log_1_1Log__context.html#ae7100d2dd130d8f130e3e64fdb1f4fd9">Log_context</a> (<a class="el" href="classflow_1_1log_1_1Logger.html">Logger</a> *logger=0)</td></tr>
<tr class="memdesc:ae7100d2dd130d8f130e3e64fdb1f4fd9 inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructs <a class="el" href="classflow_1_1log_1_1Log__context.html" title="Convenience class that simply stores a Logger and/or Component passed into a constructor; and returns...">Log_context</a> by storing the given pointer to a <a class="el" href="classflow_1_1log_1_1Logger.html" title="Interface that the user should implement, passing the implementing Logger into logging classes (Flow&#39;...">Logger</a> and a null <a class="el" href="classflow_1_1log_1_1Component.html" title="A light-weight class, each object storing a component payload encoding an enum value from enum type o...">Component</a>.  <a href="classflow_1_1log_1_1Log__context.html#ae7100d2dd130d8f130e3e64fdb1f4fd9">More...</a><br /></td></tr>
<tr class="separator:ae7100d2dd130d8f130e3e64fdb1f4fd9 inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af1ac7f30ab442c3c6aa6079335df6c9a inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="memTemplParams" colspan="2">template&lt;typename Component_payload &gt; </td></tr>
<tr class="memitem:af1ac7f30ab442c3c6aa6079335df6c9a inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="memTemplItemLeft" align="right" valign="top">&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classflow_1_1log_1_1Log__context.html#af1ac7f30ab442c3c6aa6079335df6c9a">Log_context</a> (<a class="el" href="classflow_1_1log_1_1Logger.html">Logger</a> *logger, Component_payload component_payload)</td></tr>
<tr class="memdesc:af1ac7f30ab442c3c6aa6079335df6c9a inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructs <a class="el" href="classflow_1_1log_1_1Log__context.html" title="Convenience class that simply stores a Logger and/or Component passed into a constructor; and returns...">Log_context</a> by storing the given pointer to a <a class="el" href="classflow_1_1log_1_1Logger.html" title="Interface that the user should implement, passing the implementing Logger into logging classes (Flow&#39;...">Logger</a> and a new <a class="el" href="classflow_1_1log_1_1Component.html" title="A light-weight class, each object storing a component payload encoding an enum value from enum type o...">Component</a> storing the specified generically typed payload (an <code>enum</code> value).  <a href="classflow_1_1log_1_1Log__context.html#af1ac7f30ab442c3c6aa6079335df6c9a">More...</a><br /></td></tr>
<tr class="separator:af1ac7f30ab442c3c6aa6079335df6c9a inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5c57a7f44959a01ca9a1c948a6686cc0 inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1log_1_1Log__context.html#a5c57a7f44959a01ca9a1c948a6686cc0">Log_context</a> (const <a class="el" href="classflow_1_1log_1_1Log__context.html">Log_context</a> &amp;src)</td></tr>
<tr class="memdesc:a5c57a7f44959a01ca9a1c948a6686cc0 inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="mdescLeft">&#160;</td><td class="mdescRight">Copy constructor that stores equal <code>Logger*</code> and <a class="el" href="classflow_1_1log_1_1Component.html" title="A light-weight class, each object storing a component payload encoding an enum value from enum type o...">Component</a> values as the source.  <a href="classflow_1_1log_1_1Log__context.html#a5c57a7f44959a01ca9a1c948a6686cc0">More...</a><br /></td></tr>
<tr class="separator:a5c57a7f44959a01ca9a1c948a6686cc0 inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3d4e624833d96bdafa1485ffff472509 inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1log_1_1Log__context.html#a3d4e624833d96bdafa1485ffff472509">Log_context</a> (<a class="el" href="classflow_1_1log_1_1Log__context.html">Log_context</a> &amp;&amp;src)</td></tr>
<tr class="memdesc:a3d4e624833d96bdafa1485ffff472509 inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="mdescLeft">&#160;</td><td class="mdescRight">Move constructor that makes this equal to <code>src</code>, while the latter becomes as-if default-constructed.  <a href="classflow_1_1log_1_1Log__context.html#a3d4e624833d96bdafa1485ffff472509">More...</a><br /></td></tr>
<tr class="separator:a3d4e624833d96bdafa1485ffff472509 inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5d628315d5a93908d47a281980d3113e inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classflow_1_1log_1_1Log__context.html">Log_context</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1log_1_1Log__context.html#a5d628315d5a93908d47a281980d3113e">operator=</a> (const <a class="el" href="classflow_1_1log_1_1Log__context.html">Log_context</a> &amp;src)</td></tr>
<tr class="memdesc:a5d628315d5a93908d47a281980d3113e inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="mdescLeft">&#160;</td><td class="mdescRight">Assignment operator that behaves similarly to the copy constructor.  <a href="classflow_1_1log_1_1Log__context.html#a5d628315d5a93908d47a281980d3113e">More...</a><br /></td></tr>
<tr class="separator:a5d628315d5a93908d47a281980d3113e inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aae857197aecba8606c32296bc7bec308 inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classflow_1_1log_1_1Log__context.html">Log_context</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1log_1_1Log__context.html#aae857197aecba8606c32296bc7bec308">operator=</a> (<a class="el" href="classflow_1_1log_1_1Log__context.html">Log_context</a> &amp;&amp;src)</td></tr>
<tr class="memdesc:aae857197aecba8606c32296bc7bec308 inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="mdescLeft">&#160;</td><td class="mdescRight">Move assignment operator that behaves similarly to the move constructor.  <a href="classflow_1_1log_1_1Log__context.html#aae857197aecba8606c32296bc7bec308">More...</a><br /></td></tr>
<tr class="separator:aae857197aecba8606c32296bc7bec308 inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa6bb8e4250586425631ef80063caf155 inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1log_1_1Log__context.html#aa6bb8e4250586425631ef80063caf155">swap</a> (<a class="el" href="classflow_1_1log_1_1Log__context.html">Log_context</a> &amp;other)</td></tr>
<tr class="memdesc:aa6bb8e4250586425631ef80063caf155 inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="mdescLeft">&#160;</td><td class="mdescRight">Swaps <a class="el" href="classflow_1_1log_1_1Logger.html" title="Interface that the user should implement, passing the implementing Logger into logging classes (Flow&#39;...">Logger</a> pointers and <a class="el" href="classflow_1_1log_1_1Component.html" title="A light-weight class, each object storing a component payload encoding an enum value from enum type o...">Component</a> objects held by <code>*this</code> and <code>other</code>.  <a href="classflow_1_1log_1_1Log__context.html#aa6bb8e4250586425631ef80063caf155">More...</a><br /></td></tr>
<tr class="separator:aa6bb8e4250586425631ef80063caf155 inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af4db395042b065b00398cd59845dcb4d inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classflow_1_1log_1_1Logger.html">Logger</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1log_1_1Log__context.html#af4db395042b065b00398cd59845dcb4d">get_logger</a> () const</td></tr>
<tr class="memdesc:af4db395042b065b00398cd59845dcb4d inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the stored <a class="el" href="classflow_1_1log_1_1Logger.html" title="Interface that the user should implement, passing the implementing Logger into logging classes (Flow&#39;...">Logger</a> pointer, particularly as many <code>FLOW_LOG_*()</code> macros expect.  <a href="classflow_1_1log_1_1Log__context.html#af4db395042b065b00398cd59845dcb4d">More...</a><br /></td></tr>
<tr class="separator:af4db395042b065b00398cd59845dcb4d inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8a5fef42dc2cedf3c0d1a6e83beb2948 inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classflow_1_1log_1_1Component.html">Component</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1log_1_1Log__context.html#a8a5fef42dc2cedf3c0d1a6e83beb2948">get_log_component</a> () const</td></tr>
<tr class="memdesc:a8a5fef42dc2cedf3c0d1a6e83beb2948 inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns reference to the stored <a class="el" href="classflow_1_1log_1_1Component.html" title="A light-weight class, each object storing a component payload encoding an enum value from enum type o...">Component</a> object, particularly as many <code>FLOW_LOG_*()</code> macros expect.  <a href="classflow_1_1log_1_1Log__context.html#a8a5fef42dc2cedf3c0d1a6e83beb2948">More...</a><br /></td></tr>
<tr class="separator:a8a5fef42dc2cedf3c0d1a6e83beb2948 inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-static-methods" name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:abd543abbfae859ddc111741468f95125"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1perf_1_1Checkpointing__timer_1_1Aggregator.html#abd543abbfae859ddc111741468f95125">log_aggregated_result_in_timer</a> (<a class="el" href="classflow_1_1log_1_1Logger.html">log::Logger</a> *logger_ptr, const <a class="el" href="classflow_1_1perf_1_1Checkpointing__timer.html">Checkpointing_timer</a> &amp;agg_timer, unsigned int n_samples, uint64_t mean_scale_or_zero=1)</td></tr>
<tr class="memdesc:abd543abbfae859ddc111741468f95125"><td class="mdescLeft">&#160;</td><td class="mdescRight">Given an aggregated-result <a class="el" href="classflow_1_1perf_1_1Checkpointing__timer.html" title="The central class in the perf Flow module, this efficiently times the user&#39;s operation,...">Checkpointing_timer</a> (as if returned by <a class="el" href="classflow_1_1perf_1_1Checkpointing__timer_1_1Aggregator.html#acbacf3b4842b77f542082e7a186f1434" title="Provides programmatic access to the aggregation result that would be logged by log_aggregated_results...">create_aggregated_result()</a>) logs the SUM or MEAN or SCALED-MEAN stored in it as INFO messages.  <a href="classflow_1_1perf_1_1Checkpointing__timer_1_1Aggregator.html#abd543abbfae859ddc111741468f95125">More...</a><br /></td></tr>
<tr class="separator:abd543abbfae859ddc111741468f95125"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:a6ea09e3aa22c8e4ba234f465bdc0e0fd"><td class="memItemLeft" align="right" valign="top"><a id="a6ea09e3aa22c8e4ba234f465bdc0e0fd" name="a6ea09e3aa22c8e4ba234f465bdc0e0fd"></a>
const std::string&#160;</td><td class="memItemRight" valign="bottom"><b>m_name</b></td></tr>
<tr class="memdesc:a6ea09e3aa22c8e4ba234f465bdc0e0fd"><td class="mdescLeft">&#160;</td><td class="mdescRight">The immutable human-readable name for this timer. It's <code>const</code> so no need for accessor for now. <br /></td></tr>
<tr class="separator:a6ea09e3aa22c8e4ba234f465bdc0e0fd"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p >This companion/inner class of <a class="el" href="classflow_1_1perf_1_1Checkpointing__timer.html" title="The central class in the perf Flow module, this efficiently times the user&#39;s operation,...">Checkpointing_timer</a> provides aggregation of results from many <code><a class="el" href="classflow_1_1perf_1_1Checkpointing__timer.html" title="The central class in the perf Flow module, this efficiently times the user&#39;s operation,...">Checkpointing_timer</a></code>s each measuring some user operation being repeated many times; particularly when the operation consists of multiple steps (checkpoints) of interest. </p>
<p >Please read the aggregation section in <a class="el" href="classflow_1_1perf_1_1Checkpointing__timer.html" title="The central class in the perf Flow module, this efficiently times the user&#39;s operation,...">Checkpointing_timer</a> doc header before using this.</p>
<p >One small technical point: To make a <a class="el" href="classflow_1_1perf_1_1Checkpointing__timer.html" title="The central class in the perf Flow module, this efficiently times the user&#39;s operation,...">Checkpointing_timer</a> X available for <code>Aggregator::aggregate(X)</code>, you must construct it on the heap and provide a Checkpointing_timer_ptr accordingly:</p>
<div class="fragment"><div class="line"><a class="code hl_typedef" href="namespaceflow_1_1perf.html#a09ba385403a0f347f283659a6e9d971b">Checkpointing_timer_ptr</a> X(<span class="keyword">new</span> <a class="code hl_function" href="classflow_1_1perf_1_1Checkpointing__timer.html#aa9940d8e87883f9985ba18939f833db9">Checkpointing_timer</a>(...));</div>
<div class="ttc" id="aclassflow_1_1perf_1_1Checkpointing__timer_html_aa9940d8e87883f9985ba18939f833db9"><div class="ttname"><a href="classflow_1_1perf_1_1Checkpointing__timer.html#aa9940d8e87883f9985ba18939f833db9">flow::perf::Checkpointing_timer::Checkpointing_timer</a></div><div class="ttdeci">Checkpointing_timer(log::Logger *logger_ptr, std::string &amp;&amp;name_moved, Clock_types_subset which_clocks, size_t max_n_checkpoints)</div><div class="ttdoc">Constructs a new timer and immediately begins measuring time, in that the next checkpoint() call will...</div><div class="ttdef"><b>Definition:</b> checkpt_timer.cpp:29</div></div>
<div class="ttc" id="anamespaceflow_1_1perf_html_a09ba385403a0f347f283659a6e9d971b"><div class="ttname"><a href="namespaceflow_1_1perf.html#a09ba385403a0f347f283659a6e9d971b">flow::perf::Checkpointing_timer_ptr</a></div><div class="ttdeci">boost::shared_ptr&lt; Checkpointing_timer &gt; Checkpointing_timer_ptr</div><div class="ttdoc">Short-hand for ref-counting pointer to Checkpointing_timer.</div><div class="ttdef"><b>Definition:</b> perf_fwd.hpp:43</div></div>
</div><!-- fragment --><h3>Thread safety</h3>
<p >A reiteration of the aforementioned <a class="el" href="classflow_1_1perf_1_1Checkpointing__timer.html" title="The central class in the perf Flow module, this efficiently times the user&#39;s operation,...">Checkpointing_timer</a> doc header: Non-<code>const</code> methods are generally not safe if called concurrently with any other method on the same <a class="el" href="classflow_1_1perf_1_1Checkpointing__timer_1_1Aggregator.html" title="This companion/inner class of Checkpointing_timer provides aggregation of results from many Checkpoin...">Aggregator</a>. In practice this should only matter for calling <a class="el" href="classflow_1_1perf_1_1Checkpointing__timer_1_1Aggregator.html#a18bdb2f17039bcb82ddd4022a3a8340d" title="Register given Checkpointing_timer for aggregated results.">aggregate()</a>. If you are timing things concurrently happening in different threads you may need to add a mutex lock around <a class="el" href="classflow_1_1perf_1_1Checkpointing__timer_1_1Aggregator.html#a18bdb2f17039bcb82ddd4022a3a8340d" title="Register given Checkpointing_timer for aggregated results.">aggregate()</a>; and in that case make sure it doesn't adversely affect your algorithm's overall performance (or, if it does, then that is acceptable). </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="adbe0250e405ae2be4b434f5e2cb76f7a" name="adbe0250e405ae2be4b434f5e2cb76f7a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adbe0250e405ae2be4b434f5e2cb76f7a">&#9670;&nbsp;</a></span>Aggregator()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">flow::perf::Checkpointing_timer::Aggregator::Aggregator </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classflow_1_1log_1_1Logger.html">log::Logger</a> *&#160;</td>
          <td class="paramname"><em>logger_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::string &amp;&amp;&#160;</td>
          <td class="paramname"><em>name_moved</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>max_n_samples</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">explicit</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Constructs a new, empty aggregator. </p>
<p >After this call <a class="el" href="classflow_1_1perf_1_1Checkpointing__timer_1_1Aggregator.html#a18bdb2f17039bcb82ddd4022a3a8340d" title="Register given Checkpointing_timer for aggregated results.">aggregate()</a> to add source <code><a class="el" href="classflow_1_1perf_1_1Checkpointing__timer.html" title="The central class in the perf Flow module, this efficiently times the user&#39;s operation,...">Checkpointing_timer</a></code>s.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">name_moved</td><td>Nickname for the agg, for logging and such. </td></tr>
    <tr><td class="paramname">max_n_samples</td><td>The number of times you shall call <a class="el" href="classflow_1_1perf_1_1Checkpointing__timer_1_1Aggregator.html#a18bdb2f17039bcb82ddd4022a3a8340d" title="Register given Checkpointing_timer for aggregated results.">aggregate()</a> shall not exceed this. See similar (in spirit) <code>max_n_checkpoints</code> in <a class="el" href="classflow_1_1perf_1_1Checkpointing__timer.html" title="The central class in the perf Flow module, this efficiently times the user&#39;s operation,...">Checkpointing_timer</a> constructor. </td></tr>
    <tr><td class="paramname">logger_ptr</td><td>Logger to use for subsequently logging. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a18bdb2f17039bcb82ddd4022a3a8340d" name="a18bdb2f17039bcb82ddd4022a3a8340d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a18bdb2f17039bcb82ddd4022a3a8340d">&#9670;&nbsp;</a></span>aggregate()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void flow::perf::Checkpointing_timer::Aggregator::aggregate </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="namespaceflow_1_1perf.html#a09ba385403a0f347f283659a6e9d971b">Checkpointing_timer_ptr</a>&#160;</td>
          <td class="paramname"><em>timer_ptr</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Register given <a class="el" href="classflow_1_1perf_1_1Checkpointing__timer.html" title="The central class in the perf Flow module, this efficiently times the user&#39;s operation,...">Checkpointing_timer</a> for aggregated results. </p>
<p >The best time to call this is immediately after the last <code>timer_ptr-&gt;<a class="el" href="classflow_1_1perf_1_1Checkpointing__timer.html#a9e6078df059d5626ab5774f0a33fbad7" title="Records a checkpoint, which takes a sample of all enabled Clock_types&#39; clocks and records the corresp...">checkpoint()</a></code> call, as that way the call itself won't be included in the timer's duration(s).</p>
<p >The second best time to call it is immediately after <code>*timer_ptr</code> is constructed; the call is quite cheap, so it really shouldn't affect results much. The third best time is somewhere between those 2 points in time; in that case its (quite small, probably negligible) time cost will be charged to whatever checkpoint was "running" at the time.</p>
<h3>Requirements on aggregated timers</h3>
<p >In and of itself <code>*timer_ptr</code> can be any <a class="el" href="classflow_1_1perf_1_1Checkpointing__timer.html" title="The central class in the perf Flow module, this efficiently times the user&#39;s operation,...">Checkpointing_timer</a> with at least one <a class="el" href="classflow_1_1perf_1_1Checkpointing__timer.html#a9e6078df059d5626ab5774f0a33fbad7" title="Records a checkpoint, which takes a sample of all enabled Clock_types&#39; clocks and records the corresp...">checkpoint()</a> call done. In addition, behavior is undefined in <a class="el" href="classflow_1_1perf_1_1Checkpointing__timer_1_1Aggregator.html#a29c66da23a48bdb5096bf2f206f5cae4" title="Called after the final Checkpointing_timer has finished (final checkpoint() call) and been aggregate(...">log_aggregated_results()</a> and <a class="el" href="classflow_1_1perf_1_1Checkpointing__timer_1_1Aggregator.html#acbacf3b4842b77f542082e7a186f1434" title="Provides programmatic access to the aggregation result that would be logged by log_aggregated_results...">create_aggregated_result()</a> unless all of the following hold about all <code><a class="el" href="classflow_1_1perf_1_1Checkpointing__timer_1_1Aggregator.html#a18bdb2f17039bcb82ddd4022a3a8340d" title="Register given Checkpointing_timer for aggregated results.">aggregate()</a></code>d timers at the time of those calls.</p><ul>
<li>Their <code>which_clocks</code> values (as passed to <a class="el" href="classflow_1_1perf_1_1Checkpointing__timer.html" title="The central class in the perf Flow module, this efficiently times the user&#39;s operation,...">Checkpointing_timer</a> constructor) are all equal.</li>
<li>They each have the same number of checkpoints.</li>
<li>For each <code>i</code>: Their <code>i</code>-th <a class="el" href="structflow_1_1perf_1_1Checkpointing__timer_1_1Checkpoint.html#a6c0363e3e1ef330464b87363e4287758" title="User-supplied name of the checkpoint.">Checkpointing_timer::Checkpoint::m_name</a> values are all mutually equal.</li>
</ul>
<p >Since aggregation collates the many measurements of the same multi-step operation, these should all be common sense; if one doesn't hold for you, there is some kind of very basic problem.</p>
<h3>Thread safety</h3>
<p >See <a class="el" href="classflow_1_1perf_1_1Checkpointing__timer_1_1Aggregator.html" title="This companion/inner class of Checkpointing_timer provides aggregation of results from many Checkpoin...">Aggregator</a> doc header. A mutex lock around this call may be desirable depending on situation.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">timer_ptr</td><td>The timer to register. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="acbacf3b4842b77f542082e7a186f1434" name="acbacf3b4842b77f542082e7a186f1434"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acbacf3b4842b77f542082e7a186f1434">&#9670;&nbsp;</a></span>create_aggregated_result()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="namespaceflow_1_1perf.html#a09ba385403a0f347f283659a6e9d971b">Checkpointing_timer_ptr</a> flow::perf::Checkpointing_timer::Aggregator::create_aggregated_result </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classflow_1_1log_1_1Logger.html">log::Logger</a> *&#160;</td>
          <td class="paramname"><em>alternate_logger_ptr_or_null</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>info_log_result</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint64_t&#160;</td>
          <td class="paramname"><em>mean_scale_or_zero</em> = <code>1</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Provides programmatic access to the aggregation result that would be logged by <a class="el" href="classflow_1_1perf_1_1Checkpointing__timer_1_1Aggregator.html#a29c66da23a48bdb5096bf2f206f5cae4" title="Called after the final Checkpointing_timer has finished (final checkpoint() call) and been aggregate(...">log_aggregated_results()</a> &ndash; in the form of a returned new <a class="el" href="classflow_1_1perf_1_1Checkpointing__timer.html" title="The central class in the perf Flow module, this efficiently times the user&#39;s operation,...">Checkpointing_timer</a> that stores those numbers. </p>
<p ><a class="el" href="classflow_1_1perf_1_1Checkpointing__timer_1_1Aggregator.html#a29c66da23a48bdb5096bf2f206f5cae4" title="Called after the final Checkpointing_timer has finished (final checkpoint() call) and been aggregate(...">log_aggregated_results()</a> basically calls this once for each type of aggregated data it wants to see. Accordingly, if you desire programmatic access to type X of aggregated results, call this and specify the type X of interest, as args. <a class="el" href="classflow_1_1perf_1_1Checkpointing__timer_1_1Aggregator.html#a29c66da23a48bdb5096bf2f206f5cae4" title="Called after the final Checkpointing_timer has finished (final checkpoint() call) and been aggregate(...">log_aggregated_results()</a> doc header's perf notes apply here similarly.</p>
<p >You can also use <code>info_log_result</code> to immediately log the results, as <a class="el" href="classflow_1_1perf_1_1Checkpointing__timer_1_1Aggregator.html#a29c66da23a48bdb5096bf2f206f5cae4" title="Called after the final Checkpointing_timer has finished (final checkpoint() call) and been aggregate(...">log_aggregated_results()</a> would for that aggregation type. Conceivably you could then ignore the return value, depending on your goals.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">alternate_logger_ptr_or_null</td><td>Same meaning as for <a class="el" href="classflow_1_1perf_1_1Checkpointing__timer_1_1Aggregator.html#a29c66da23a48bdb5096bf2f206f5cae4" title="Called after the final Checkpointing_timer has finished (final checkpoint() call) and been aggregate(...">log_aggregated_results()</a>. However here this is only relevant if <code>info_log_result</code>; otherwise ignored (null is fine). </td></tr>
    <tr><td class="paramname">info_log_result</td><td>If and only if <code>true</code>, INFO messages are logged with human-readable representation of the returned data, similarly to (partial) <a class="el" href="classflow_1_1perf_1_1Checkpointing__timer_1_1Aggregator.html#a29c66da23a48bdb5096bf2f206f5cae4" title="Called after the final Checkpointing_timer has finished (final checkpoint() call) and been aggregate(...">log_aggregated_results()</a> output. Actually it simply calls <a class="el" href="classflow_1_1perf_1_1Checkpointing__timer_1_1Aggregator.html#abd543abbfae859ddc111741468f95125" title="Given an aggregated-result Checkpointing_timer (as if returned by create_aggregated_result()) logs th...">log_aggregated_result_in_timer()</a> on the returned <a class="el" href="classflow_1_1perf_1_1Checkpointing__timer.html" title="The central class in the perf Flow module, this efficiently times the user&#39;s operation,...">Checkpointing_timer</a>. </td></tr>
    <tr><td class="paramname">mean_scale_or_zero</td><td>If zero then return SUM aggregated output; otherwise MEAN or SCALED-MEAN aggregated output, with this value as the scale-constant (the value 1 =&gt; an un-scaled MEAN output). (E.g., one could show the average latency per 100,000 requests which might be more conveniently large than a per-request mean.) </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Ref-counted pointer to a new <a class="el" href="classflow_1_1perf_1_1Checkpointing__timer.html" title="The central class in the perf Flow module, this efficiently times the user&#39;s operation,...">Checkpointing_timer</a> that stores the aggregated results. This timer will have the same <code>which_clocks</code>, and its <code><a class="el" href="classflow_1_1perf_1_1Checkpointing__timer.html#a1f03d654924a3724e1f051c119f3767b" title="Returns the checkpoints recorded so far.">checkpoints()</a></code> will have the same length and in-order names, as each of the source timers; its name and <a class="el" href="classflow_1_1log_1_1Log__context.html#af4db395042b065b00398cd59845dcb4d" title="Returns the stored Logger pointer, particularly as many FLOW_LOG_*() macros expect.">get_logger()</a> will come from <a class="el" href="classflow_1_1perf_1_1Checkpointing__timer_1_1Aggregator.html" title="This companion/inner class of Checkpointing_timer provides aggregation of results from many Checkpoin...">Aggregator</a> <code>name</code> (ctor arg) and <a class="el" href="classflow_1_1log_1_1Log__context.html#af4db395042b065b00398cd59845dcb4d" title="Returns the stored Logger pointer, particularly as many FLOW_LOG_*() macros expect.">get_logger()</a> respectively. </dd></dl>

</div>
</div>
<a id="abd543abbfae859ddc111741468f95125" name="abd543abbfae859ddc111741468f95125"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abd543abbfae859ddc111741468f95125">&#9670;&nbsp;</a></span>log_aggregated_result_in_timer()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void flow::perf::Checkpointing_timer::Aggregator::log_aggregated_result_in_timer </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classflow_1_1log_1_1Logger.html">log::Logger</a> *&#160;</td>
          <td class="paramname"><em>logger_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classflow_1_1perf_1_1Checkpointing__timer.html">Checkpointing_timer</a> &amp;&#160;</td>
          <td class="paramname"><em>agg_timer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>n_samples</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint64_t&#160;</td>
          <td class="paramname"><em>mean_scale_or_zero</em> = <code>1</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Given an aggregated-result <a class="el" href="classflow_1_1perf_1_1Checkpointing__timer.html" title="The central class in the perf Flow module, this efficiently times the user&#39;s operation,...">Checkpointing_timer</a> (as if returned by <a class="el" href="classflow_1_1perf_1_1Checkpointing__timer_1_1Aggregator.html#acbacf3b4842b77f542082e7a186f1434" title="Provides programmatic access to the aggregation result that would be logged by log_aggregated_results...">create_aggregated_result()</a>) logs the SUM or MEAN or SCALED-MEAN stored in it as INFO messages. </p>
<p >Publicly, it exists for one use case (as of this writing), namely to log a "manually" compiled aggregated-result <a class="el" href="classflow_1_1perf_1_1Checkpointing__timer.html" title="The central class in the perf Flow module, this efficiently times the user&#39;s operation,...">Checkpointing_timer</a>. This <em>pattern</em> is explained in the <a class="el" href="classflow_1_1perf_1_1Checkpointing__timer.html" title="The central class in the perf Flow module, this efficiently times the user&#39;s operation,...">Checkpointing_timer</a> doc header in the aggregation section.</p>
<p >Naturally, it is also used internally by <a class="el" href="classflow_1_1perf_1_1Checkpointing__timer_1_1Aggregator.html#acbacf3b4842b77f542082e7a186f1434" title="Provides programmatic access to the aggregation result that would be logged by log_aggregated_results...">create_aggregated_result()</a> and <a class="el" href="classflow_1_1perf_1_1Checkpointing__timer_1_1Aggregator.html#a29c66da23a48bdb5096bf2f206f5cae4" title="Called after the final Checkpointing_timer has finished (final checkpoint() call) and been aggregate(...">log_aggregated_results()</a>, hence why they all produce similar output.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">logger_ptr</td><td>Same meaning as in <a class="el" href="classflow_1_1perf_1_1Checkpointing__timer_1_1Aggregator.html#a29c66da23a48bdb5096bf2f206f5cae4" title="Called after the final Checkpointing_timer has finished (final checkpoint() call) and been aggregate(...">log_aggregated_results()</a>, except null is not a valid value (behavior is undefined). </td></tr>
    <tr><td class="paramname">agg_timer</td><td>Aggregated-result <a class="el" href="classflow_1_1perf_1_1Checkpointing__timer.html" title="The central class in the perf Flow module, this efficiently times the user&#39;s operation,...">Checkpointing_timer</a>, as if returned by <a class="el" href="classflow_1_1perf_1_1Checkpointing__timer_1_1Aggregator.html#acbacf3b4842b77f542082e7a186f1434" title="Provides programmatic access to the aggregation result that would be logged by log_aggregated_results...">create_aggregated_result()</a>. Behavior is undefined unless it was, in fact, returned by that method (or is a copy of such); or unless it was compiled as described in the aforementioned pattern, documented in <a class="el" href="classflow_1_1perf_1_1Checkpointing__timer.html" title="The central class in the perf Flow module, this efficiently times the user&#39;s operation,...">Checkpointing_timer</a> doc header. </td></tr>
    <tr><td class="paramname">n_samples</td><td>For appropriate logging, this must contain the # of samples (repetitions of the measured operation) collected to yield <code>agg_timer</code>. </td></tr>
    <tr><td class="paramname">mean_scale_or_zero</td><td>For appropriate logging, this must contain the type of aggregated numbers that are stored in <code>agg_timer</code>. See <a class="el" href="classflow_1_1perf_1_1Checkpointing__timer_1_1Aggregator.html#acbacf3b4842b77f542082e7a186f1434" title="Provides programmatic access to the aggregation result that would be logged by log_aggregated_results...">create_aggregated_result()</a>. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a29c66da23a48bdb5096bf2f206f5cae4" name="a29c66da23a48bdb5096bf2f206f5cae4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a29c66da23a48bdb5096bf2f206f5cae4">&#9670;&nbsp;</a></span>log_aggregated_results()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void flow::perf::Checkpointing_timer::Aggregator::log_aggregated_results </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classflow_1_1log_1_1Logger.html">log::Logger</a> *&#160;</td>
          <td class="paramname"><em>alternate_logger_ptr_or_null</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>show_sum</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>show_mean</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint64_t&#160;</td>
          <td class="paramname"><em>mean_scale_or_zero</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Called after the final <a class="el" href="classflow_1_1perf_1_1Checkpointing__timer.html" title="The central class in the perf Flow module, this efficiently times the user&#39;s operation,...">Checkpointing_timer</a> has finished (final <code><a class="el" href="classflow_1_1perf_1_1Checkpointing__timer.html#a9e6078df059d5626ab5774f0a33fbad7" title="Records a checkpoint, which takes a sample of all enabled Clock_types&#39; clocks and records the corresp...">checkpoint()</a></code> call) and been <code><a class="el" href="classflow_1_1perf_1_1Checkpointing__timer_1_1Aggregator.html#a18bdb2f17039bcb82ddd4022a3a8340d" title="Register given Checkpointing_timer for aggregated results.">aggregate()</a></code>d, this <code>INFO</code>-logs human-friendly readout of the aggregated results so far. </p>
<p >This will include all 3 types of aggregation: sum; mean; and mean-scaled-by-convenience-constant; or some specified subset thereof.</p>
<h3>Performance</h3>
<p >It is possible to call it between <code><a class="el" href="classflow_1_1perf_1_1Checkpointing__timer_1_1Aggregator.html#a18bdb2f17039bcb82ddd4022a3a8340d" title="Register given Checkpointing_timer for aggregated results.">aggregate()</a></code>s, perhaps to output incremental results. It may be slow and should not be called within any perf-critical section and definitely not in any measured section. The most natural time to call it is after all data collection has finished.</p>
<p >Tip: you can pass null as the logger to the ctor of each <a class="el" href="classflow_1_1perf_1_1Checkpointing__timer.html" title="The central class in the perf Flow module, this efficiently times the user&#39;s operation,...">Checkpointing_timer</a> and even the <a class="el" href="classflow_1_1perf_1_1Checkpointing__timer_1_1Aggregator.html" title="This companion/inner class of Checkpointing_timer provides aggregation of results from many Checkpoin...">Aggregator</a> and only use non-null <code>alternate_logger_ptr_or_null</code>. Then the cost of should-log checks will be zero all over except here (where presumably it does not matter).</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">alternate_logger_ptr_or_null</td><td>If null, logs are sent to <a class="el" href="classflow_1_1log_1_1Log__context.html#af4db395042b065b00398cd59845dcb4d" title="Returns the stored Logger pointer, particularly as many FLOW_LOG_*() macros expect.">get_logger()</a> as normal; otherwise it is sent to the supplied <a class="el" href="classflow_1_1log_1_1Logger.html" title="Interface that the user should implement, passing the implementing Logger into logging classes (Flow&#39;...">log::Logger</a> instead. Since logging this output is a first-class facility within <a class="el" href="classflow_1_1perf_1_1Checkpointing__timer_1_1Aggregator.html" title="This companion/inner class of Checkpointing_timer provides aggregation of results from many Checkpoin...">Checkpointing_timer::Aggregator</a> &ndash; unlike vast majority of Flow logging which is a secondary (though important in practice) nicety &ndash; it seemed sensible to provide extra control of this particular bit of logging. Also note that any (probably TRACE) logging outside of the timer-data output will still go to <a class="el" href="classflow_1_1log_1_1Log__context.html#af4db395042b065b00398cd59845dcb4d" title="Returns the stored Logger pointer, particularly as many FLOW_LOG_*() macros expect.">get_logger()</a>. </td></tr>
    <tr><td class="paramname">show_sum</td><td>Whether to show the SUM aggregated output type. </td></tr>
    <tr><td class="paramname">show_mean</td><td>Whether to show the MEAN aggregated output type. </td></tr>
    <tr><td class="paramname">mean_scale_or_zero</td><td>If zero do not show SCALED-MEAN aggregated output; otherwise show it, with this value as the scale-constant. (E.g., one could show the average latency per 100,000 requests which might be more conveniently large than a per-request mean.) </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>perf/<a class="el" href="checkpt__timer_8hpp.html">checkpt_timer.hpp</a></li>
<li>perf/<a class="el" href="checkpt__timer_8cpp.html">checkpt_timer.cpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Fri Mar 28 2025 22:55:32 for Flow by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.4
</small></address>
</body>
</html>
